package com.bwie.controller;
import com.bwie.pojo.Room;
import com.bwie.service.RoomService;
import com.bwie.service.impl.RoomServiceImpl;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (t_room)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/room/index")
public class RoomController {
/**
* 服务对象
*/
    @Autowired
    private RoomService roomService;

    @ApiOperation("查询卧室列表")
    @PostMapping("/selectRoomList")
    public R selectRoomList(@RequestBody PageInfoVo pageInfoVo){
        return roomService.selectRoomList(pageInfoVo);
    }

    @ApiOperation("判断审核")
    @PostMapping("/updateRoomStatus")
    public R updateRoomStatus(@RequestBody Room room){
        return roomService.updateRoomStatus(room);
    }

    @ApiOperation("新增房间")
    @PostMapping("/insertRoom")
    public R insertRoom(@RequestBody Room room){
        return roomService.insertRoom(room);
    }
}
